<template>
	<view class="">
		<u-tabbar :value="value4" @change="change4" :fixed="true" :placeholder="true" activeColor="#333333"
			:safeAreaInsetBottom="true">
			<u-tabbar-item :text="item.name" v-for="(item,index) in list" :key="index">
				<image class="u-page__item__slot-icon" slot="active-icon" :src="item.icon2"
					style="width: 48rpx;height: 48rpx;"></image>
				<image class="u-page__item__slot-icon" slot="inactive-icon" :src="item.icon1"
					style="width: 48rpx;height: 48rpx;"></image>
			</u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value1: 0,
				value5: 0,
				// value4: 0,
			}
		},
		props: {
			value4: {
				type: Number,
				default: 0
			},
			list: {
				type: Array,
				default: []
			}
		},
		onLoad() {
			// console.log("value",value)
		},
		methods: {
			click1(e) {
				// console.log('click1', e);
				if (e == 0) {
					uni.reLaunch({
						url: "/pages/client/home/index"
					})
				}
				if (e == 1) {
					uni.reLaunch({
						url: "/pages/client/order/index"
					})
				}
				if (e == 2) {
					uni.reLaunch({
						url: "/pages/client/mine/index"
					})
				}
				this.value1 = e
				// console.log(this.value1 );
				this.$forceUpdate()
			},
			change1(e) {
				console.log(e);
			},
			change5(name) {
				this.value5 = name
			},
			change4(name) {
				this.$emit('change4', name)
			}
		}
	}
</script>

<style scoped lang="scss">
</style>